<template>
  <el-container>
    <el-footer style="background-color: white; width: 100%; height: 100%;">
      <el-row>
        <!-- 左侧：Logo 和网站名称 -->
        <el-col :xs="24" :lg="8" :span="4" style="display: flex; flex-direction: row; align-items: center;">
          <div>
            <img src="/images/logo.png" style="height:90px;">
          </div>
          <div>
            <h2 style="padding-left: 4px;">双碳招投标网</h2>
            <p style="padding-left: 4px;">专业的双碳招投标信息平台</p>
          </div>
        </el-col>
        <!-- 中间：招标相关信息 -->
        <el-col :xs="24" :lg="8" style="align-self: center;">
          <div>
            <h2>招标信息</h2>
            <el-link type="primary" style="display: block; margin-bottom: 8px;" @click="router.push('/tenders')">
              招标预告
            </el-link>
            <el-link type="primary" style="display: block; margin-bottom: 8px;" @click="router.push('/announcements')">
              招标公告
            </el-link>
            <el-link type="primary" style="display: block; margin-bottom: 8px;" @click="router.push('/winners')">
              中标公告
            </el-link>
          </div>
        </el-col>
        <!-- 右侧：联系我们 -->
        <el-col :xs="24" :lg="8" style="align-self: center;">
          <div>
            <h2>联系我们</h2>
            <p>电话：15083638856</p>
            <p>邮箱：446291257@qq.com</p>
          </div>
        </el-col>
      </el-row>
      <el-row style="background-color: aqua; width: 100%; align-self: center;">
        <p style="align-self: center;">双碳招投标网版权所有</p>
      </el-row>
    </el-footer>
  </el-container>
</template>
<script setup>
const activeIndex = "1";
import { computed } from 'vue';
import { useUserStore } from '../stores/userStore';
import { useRouter } from 'vue-router';

const userStore = useUserStore();
const router = useRouter();

// 使用计算属性保持响应式
const isLogin = computed(() => userStore.isLoggedIn);
const nickname = computed(() => userStore.userInfo.nickname);
const avatarUrl = computed(() => userStore.userInfo.avatarUrl);

const goToLogin = () => {
  router.push('/login');
};

const goToProfile = () => {
  router.push('/user');
};
</script>